FROM python:3.6.5
ENV TZ=Asia/Shanghai
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone

ENV EPBASE=/data/kongming/kongming-iot
ENV EPLOG=/data/kongming/kongming-iot/apps/logs
RUN mkdir -p $EPBASE
RUN mkdir -p $EPLOG
COPY . $EPBASE

RUN pip install -r $EPBASE/requirements.txt
WORKDIR $EPBASE
ENTRYPOINT ["supervisord", "-n", "-c", "/data/kongming/kongming-iot/kongming.conf"]
EXPOSE 8395


# sudo docker build --rm -f "Dockerfile" -t kongming-service:latest .